//
//  HomeJournalOfThePastModel.m
//  ChineseCollegeStudentsNetwork
//
//  Created by 刘喆 on 2018/5/25.
//  Copyright © 2018年 刘喆. All rights reserved.
//

#import "CommonModel.h"

@implementation CommonModel

+ (NSDictionary *)mj_replacedKeyFromPropertyName {
    return @{@"Id":@"id"};
}

- (NSString<Optional> *)imageUrl {
    if ([_imageUrl containsString:@"http:"]) {
        return _imageUrl;
    } else {
        if ([_imageUrl containsString:@"@"]) {
           _imageUrl = [_imageUrl substringWithRange:NSMakeRange(1, _imageUrl.length-1)];
        }
        
        return [NSString stringWithFormat:@"%@%@",kBase_URL,_imageUrl];
    }
}

@end
